package de.tum.in.eist.poll.service;

import java.util.List;

import com.google.gwt.user.client.rpc.AsyncCallback;

import de.tum.in.eist.poll.shared.Feedback;
import de.tum.in.eist.poll.shared.Lecture;
import de.tum.in.eist.poll.shared.User;
/**
 * The async part of the server interface
 * @author sudi
 *
 */
public interface EistPollServiceAsync {
	/**
	 * The async counterpart of {@link PollService#login(String, String)}.
	 */
	void login(String name, String password, AsyncCallback<User> callback)
			throws IllegalArgumentException;
	
	/**
	 * The async counterpart of {@link PollService#requestLectures(User)}.
	 */
	void requestLectures(User user, AsyncCallback<List<Lecture>> callback);
	
	void requestFeedback(User user, Lecture lecture,
			AsyncCallback<List<Feedback>> callback);
	
	/**
	 * The async counterpart of {@link PollService#submitFeedback(Feedback)}.
	 */
	void submitFeedback(Feedback feedback, AsyncCallback<String> callback);
	
}
